package me.numark.net;

import android.text.TextUtils;

import com.android.volley.Request;

import me.numark.NumarkApplication;
import me.numark.utils.Global;
import me.numark.utils.Settings;
import me.numark.utils.Utils;

/**
 * Created by Evan on 14/11/19.
 */
public class NumaAPIs {

    public static void bindPush() {
        String uid = Settings.getUid();
        String url = NetworkConstants.BIND_PUSH_URL
                + "?bduserid=" + Global.BAIDU_USER_ID
                + "&channelid=" + Global.BAIDU_CHANNEL_ID
                + "&type=1&imei=" + Utils.getIMEI(NumarkApplication.getInstance())
                + (TextUtils.isEmpty(uid) ? "uid=0" : "&uid=" + uid);
        GsonRequest request = new GsonRequest(url, Request.Method.GET, BaseResponse.class, true, null, null, null);
        NetworkHelper.getInstance().addToRequestQueue(request);
        NetworkHelper.getInstance().getRequestQueue().start();
    }

}
